$(document).ready(function() {	
	$('a.button').button();
	
	$('.image, .image-controller').hover(function(event){
			$('.image-controller', this).slideDown('fast');
		},function(event){
			$('.image-controller', this).slideUp('fast');
		});
	
	/* Submit action for posting new feed */
	$('a[name="submitAddFeed"]').bind('click', {
		action : 'feed-add',
		form : '#addFeedForm',
		success : '.feed-pane',
		success_js : addFeed
	}, ajaxSubmitForm);
});

function addFeed(div, data) {
	$(div).prepend('<div>'+data+'</div>');
}